/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jtracking_client;

import java.util.Scanner;


/**
 *
 * @author claus
 */
public class Main {

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.EC4BA07C-BB1F-9C31-CFDA-2772FBFABDE4]
    // </editor-fold> 
    private Organisator organisator;
    static Main main;

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args)
    {
        main = new Main();
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.31183FD0-9CC3-E826-475F-B3377DD248AF]
    // </editor-fold> 
    public Main () {
        organisator = new Organisator();
        organisator.start();

        Scanner s = new Scanner(System.in);
        String command="";
        while(true) {
            command = s.nextLine();
            if(command.equals("exit")){
                System.exit(0);
            } else if(command.equals("pause")){
                organisator.weitermachen=false;
            } else if(command.equals("weiter")) {
                organisator.weitermachen=true;
            } else if(command.equals("send")) {
                new Thread(){
                    @Override
                    public void run(){
                        organisator.aktualisieren();
                    }
                }.start();
            }
        }
    }

}